{% extends 'teacher/base.html' %}
{% block title %}学生详情{% endblock %}
{% block section %}{{ section }}{% endblock %}
{% load customer_tags %}
{% load static %}
{% block link %}
    <link rel="stylesheet" href="{% static 'teacher/css/detail.css' %}">
{% endblock %}
{% block content %}
<form class="form-horizontal" method="post">
    {% csrf_token %}
    {% for i in form %}
      <div class="form-group {% if i.errors %}has-error{% endif %}">
          {% for j in i.errors %}
              <label for="{{ i.id_for_label }}" class="control-label">{{ j }}</label>
          {% endfor %}
        <label for="{{ i.id_for_label }}" class="col-sm-2 control-label">{{ i.label }}</label>
        <div class="col-sm-4">
{#            {% if i.label == "性别" %}#}
                {{ i }}
{#            {% else %}#}
{#                {% add_class i "form-control" %}#}
{#            {% endif %}#}
        </div>
      </div>
    {% endfor %}

    {% for i in detail_form %}
      <div class="form-group">
            {% for j in i.errors %}
              <label for="{{ i.id_for_label }}" class="control-label">{{ j }}</label>
            {% endfor %}
        <label for="{{ i.id_for_label }}" class="col-sm-2 control-label">{{ i.label }}</label>
        <div class="col-sm-4">
            {{ i }}
{#            {% add_class i "form-control" %}#}
        </div>
      </div>
    {% endfor %}
    <div class="col-sm-offset-2 col-sm-10">
      <button type="submit" class="btn btn-primary">保存</button>
      <button type="reset" class="btn btn-default">重置</button>
    </div>
  </div>
</form>
{% endblock %}